﻿using System.IO;
using System.Text;

namespace BrettM.IO
{

    /// <summary>
    /// Implements a StringWriter allowing the Text Endcoding to be changed
    /// </summary>
    public class EncodedStringWriter
        : StringWriter
    {
        private readonly Encoding _encoding;

        public EncodedStringWriter(Encoding encoding)
        {
            _encoding = encoding;
        }

        public override Encoding Encoding
        {
            get { return _encoding; }
        }
    }
}
